import scrapy
from scrapy.linkextractors import LinkExtractor


class Che168Spider(scrapy.Spider):
    name = "che168"
    allowed_domains = ["che168.com", "autohome.com.cn"]
    start_urls = ["https://www.che168.com/hefei/benchi/#pvareaid=102179"]

    def parse(self, response,**kwargs):
        # 之前的逻辑
        # li_list = response.xpath('//ul[@class="viewlist_ul"]/li[@name="lazyloadcpc"]')
        # for li in li_list:
        #     title = li.xpath('./a//h4[@class="card-name"]/text()').extract_first()
        #     href = li.xpath('./a/@href').extract_first()
        #     print(title, href)
        link_extractor =LinkExtractor()
